public class Main {
    public static void main(String[] args) {
        Car sedan = CarFactory.createCar("sedan");
        Car suv = CarFactory.createCar("suv");
        Car truck = CarFactory.createCar("truck");

        // 调用车的公共方法和特有方法
        sedan.commonMethod();
        sedan.specificMethod();

        suv.commonMethod();
        suv.specificMethod();
        truck.commonMethod();
        truck.specificMethod();

    }
}